package com.h6.crm.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "客户信息实体")
@Data
@TableName("Sa_Client")
public class Client implements Serializable {

    @Schema(description = "客户ID")
    @TableId(value = "ClientID", type = IdType.AUTO)
    Long id;

    @TableField(value = "UpID")
    Integer upId;

    @TableField(value = "BillType")
    Integer BillType;

    @TableField(value = "CompanyID")
    Integer companyId;

    @TableField(value = "PaymentMethodID")
    Integer paymentMethodID;

    @TableField(value = "CurrencyID")
    Integer currencyID;

    @TableField(value = "Payment")
    String payment;

    @TableField(value = "EmplID")
    Long emplId;

    @TableField(value = "EmplName")
    String emplName;

    @Schema(description = "名称")
    @TableField("ClientName")
    String name; // 名称

    @Schema(description = "客户编号")
    @TableField("ClientCode")
    String clientCode; // 编号

    @Schema(description = "联系人")
    @TableField("LinkMan")
    String contact; // 联系人

    @Schema(description = "联系方式，手机号")
    @TableField("Tel_1")
    String phone; // 联系方式 手机号

    @Schema(description = "地址")
    @TableField("Address")
    String address; // 地址

    @Schema(description = "是否停用")
    @TableField("Enabled")
    Boolean enabled; // 是否停用

    @Schema(description = "创建者")
    @TableField(value = "Creater", fill = FieldFill.INSERT)
    String creater;

    @Schema(description = "创建时间")
    @TableField(value = "CreateTime", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;

    @Schema(description = "修改者")
    @TableField(value = "Modify", fill = FieldFill.INSERT_UPDATE)
    String modify;

    @Schema(description = "修改时间")
    @TableField(value = "ModifyTime", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date modifyTime;

    @TableField("Status")
    Integer status;

}
